package com.sdlh.demo.newfeature;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public record Person<T, P>(T name, P age) implements AutoCloseable {
    public static String sex;

    public Person {
        log.info("Person构造函数初始化...");
    }

    @Override
    public void close() throws Exception {
        log.info("姓名:{}，年龄:{}，性别:{} 退出", name, age, sex);
    }
}
